package com.ceair.flight.refund.location.model;

import com.ceair.flight.refund.util.DateUtil;
import com.ceair.flight.refund.util.StringUtil;
import com.ceair.muservice.common.dto.AbstractBaseDO;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Set;

public class FlightOrderDO extends AbstractBaseDO implements Serializable { // 机票订单表

    private static final long serialVersionUID = -532257073938131583L;
    /**
     * 机票订单号 *
     */
    private String flightOrderNo;
    /**
     * 产品类型 ？江南通，？动态打包，？中转特价*
     */
    private String productType;
    /**
     * 航程类型 OW：单程，MT：多程，RT：来回，OJ：缺口*
     */
    private String routeTp;
    /**
     * 订单范围（d国内 i国际） *
     */
    private String orderScope;
    /**
     * 出票方式*
     */
    private String issueType;
    /**
     * 订单状态 1等待支付2等待开票3已开票4开票失败5已取消6异常7差错退款8支付中*
     */
    private Integer orderSt;
    /**
     * 关联老订单号 *
     */
    private String oldRecId;
    /**
     * 订单性质 1原始订单2升舱订单3收费改期订单*
     */
    private Integer orderTp;
    /**
     * 关联新订单号 *
     */
    private String newRecId;
    /**
     * 来源ip *
     */
    private String sourceIp;
    /**
     * 渠道 *
     */
    private String channel;
    /**
     * 订票站点 *
     */
    private String site;
    /**
     * ei *
     */
    private String ei;
    /**
     * comment项 *
     */
    private String ecomment;
    /**
     * 订单总票面价 *
     */
    private BigDecimal fcNy;
    /**
     * 订单总销售价 *
     */
    private BigDecimal scNy;
    /**
     * 订单总税费 *
     */
    private BigDecimal taxAm;
    /**
     * 订单总代理费 *
     */
    private BigDecimal agentAm;
    /**
     * 支付流水号 *
     */
    private String payNo;
    /**
     * 手续费 *
     */
    private BigDecimal changeAm;
    /**
     * 销售额差价 *
     */
    private BigDecimal scnyDiff;
    /**
     * 代理费差价 *
     */
    private BigDecimal agentAmDiff;
    /**
     * 税费差价 *
     */
    private BigDecimal taxDiff;
    /**
     * 票面价差额 *
     */
    private BigDecimal fcnyDiff;
    /**
     * c值 *
     */
    private Integer discountC;
    /**
     * z值 *
     */
    private Integer discountZ;
    /**
     * 代理费 *
     */
    private double agentCam;
    /**
     * 直减金额 *
     */
    private double agentZam;
    /**
     * 代理费差额 *
     */
    private double agentCamDiff;
    /**
     * 直减金额差额 *
     */
    private double agentZamDiff;
    /**
     * 机票退改升状态 10未退改升20部分退改升30全部退改升*
     */
    private Integer curStatus;
    /**
     * 退票标记 *
     */
    private boolean refundedFlag;
    /**
     * 改升标记 *
     */
    private boolean changeUpdateFlag;
    /**
     * 出票结果 *
     */
    private Integer issueTicketSt;
    /**
     * 出票失败 *
     */
    private String issueTicketMessage;
    /**
     * 差错退款标记 *
     */
    private Integer errorRefundFlag;
    /**
     * 大订单号 *
     */
    private String orderNo;
    /**
     * 联系人姓名 *
     */
    private String contactNm;
    /**
     * 联系人电话 *
     */
    private String contactTel;
    /**
     * 联系人电话 国家码
     */
    private String contactTelCountry;
    /**
     * 联系邮箱 *
     */
    private String contactEmail;
    /**
     * 币种*
     */
    private String currency;
    /**
     * 是否北美
     */
    private String northAmerica;
    /**
     * 乘客 *
     */
    private Set<PaxDO> paxs;
    /**
     * 机票 *
     */
    private Set<TicketDO> tickets;
    /**
     * 税项 *
     */
    private Set<TaxFeeDO> taxFees;
    /**
     * 航段 *
     */
    private Set<SegmentDO> segments;
    /**
     *
     * 出票次数
     */
    private Integer ticketCount = 0;

    /**
     * 购买人卡等级
     */
    private String cardType;

    /**
     * 购买人常旅客卡号
     */
    private String ffpNo;
    /**
     * 是否spa航段
     *
     */
    private String flightType;

    /*
     * 促销码
     * */
    private String promoCode;
    /*
     * 促销类型
     * */
    private String promoType;
    /**
     * 优惠金额币种
     *
     */
    private String promoCurrency;
    /*
     * 优惠金额
     * */
    private BigDecimal promoAmount;
    /**
     * 是否重要航班订单
     */
    private String isImportantFlight;
    /*
     * 升舱券券号
     * */
    private String upgradeCouponNo;
    /**积分票面差额**/
    private BigDecimal pointFcnyDiff;
    /**积分手续费**/
    private BigDecimal pointScnyDiff;
    /**积分差价总额**/
    private BigDecimal pointChangeAm;
    /**
     * 大客户号 *
     */
    private String kamNo;
    /**
     * 来源
     * 其中source按照如下规则填写，由前段传入，非必填 格式（key-value）
		appstore-苹果App Store
		google-google play
		samsung-三星应用商店
		huawei-华为应用市场
		coolapk-酷市场
		wandoujia-豌豆荚
		yingyongbao-应用宝
		baidu-百度手机助手（含91，安卓市场）
		360-360手机助手
		mi-小米应用商店
		oppo-oppo应用商店
		vivo-vivo应用商店
     */

    /**
     * 来源
     * @return
     */
    private String source;

    /**
     * 国家
     * @return
     */
    private String country;

    /**
     * 语言
     * @return
     */
    private String language;

    /**
     * 团票标识    1为团队票，0为非团队票    默认值为0
     * @return
     */
    private Integer groupTicket = 0;

    /**
     * 促销类型
     */
    private String promoTp;//1.海外B2C后台的促销码或者券 2.促销平台的红包券

    public Integer getGroupTicket() {
		return groupTicket;
	}

	public void setGroupTicket(Integer groupTicket) {
		this.groupTicket = groupTicket;
	}

    public String getSource() {
		return source;
	}

	public void setSource(String source) {
		this.source = source;
	}

	public String getCountry() {
		return country;
	}

	public void setCountry(String country) {
		this.country = country;
	}

	public String getLanguage() {
		return language;
	}

	public void setLanguage(String language) {
		this.language = language;
	}

    public String getFlightOrderNo() {
        return flightOrderNo;
    }

    public void setFlightOrderNo(String flightOrderNo) {
        this.flightOrderNo = flightOrderNo;
    }

    public String getProductType() {
        return productType;
    }

    public void setProductType(String productType) {
        this.productType = productType;
    }

    public String getRouteTp() {
        return routeTp;
    }

    public void setRouteTp(String routeTp) {
        this.routeTp = routeTp;
    }

    public String getOrderScope() {
        return orderScope;
    }

    public void setOrderScope(String orderScope) {
        this.orderScope = orderScope;
    }

    public Integer getOrderSt() {
        return orderSt;
    }

    public void setOrderSt(Integer orderSt) {
        this.orderSt = orderSt;
    }

    public Integer getOrderTp() {
        return orderTp;
    }

    public void setOrderTp(Integer orderTp) {
        this.orderTp = orderTp;
    }

    public String getOldRecId() {
        return oldRecId;
    }

    public void setOldRecId(String oldRecId) {
        this.oldRecId = oldRecId;
    }

    public String getNewRecId() {
        return newRecId;
    }

    public void setNewRecId(String newRecId) {
        this.newRecId = newRecId;
    }

    public String getSourceIp() {
        return sourceIp;
    }

    public void setSourceIp(String sourceIp) {
        this.sourceIp = sourceIp;
    }

    public String getChannel() {
        return channel;
    }

    public void setChannel(String channel) {
        this.channel = channel;
    }

    public String getSite() {
        return site;
    }

    public void setSite(String site) {
        this.site = site;
    }

    public String getEi() {
        return ei;
    }

    public void setEi(String ei) {
        this.ei = ei;
    }

    public String getEcomment() {
        return ecomment;
    }

    public void setEcomment(String ecomment) {
        this.ecomment = ecomment;
    }

    public BigDecimal getFcNy() {
        return fcNy;
    }

    public void setFcNy(BigDecimal fcNy) {
        this.fcNy = fcNy;
    }

    public BigDecimal getScNy() {
        return scNy;
    }

    public void setScNy(BigDecimal scNy) {
        this.scNy = scNy;
    }

    public BigDecimal getTaxAm() {
        return taxAm;
    }

    public void setTaxAm(BigDecimal taxAm) {
        this.taxAm = taxAm;
    }

    public BigDecimal getAgentAm() {
        return agentAm;
    }

    public void setAgentAm(BigDecimal agentAm) {
        this.agentAm = agentAm;
    }

    public String getPayNo() {
        return payNo;
    }

    public void setPayNo(String payNo) {
        this.payNo = payNo;
    }

    public BigDecimal getChangeAm() {
        return changeAm;
    }

    public void setChangeAm(BigDecimal changeAm) {
        this.changeAm = changeAm;
    }

    public BigDecimal getScnyDiff() {
        return scnyDiff;
    }

    public void setScnyDiff(BigDecimal scnyDiff) {
        this.scnyDiff = scnyDiff;
    }

    public BigDecimal getAgentAmDiff() {
        return agentAmDiff;
    }

    public void setAgentAmDiff(BigDecimal agentAmDiff) {
        this.agentAmDiff = agentAmDiff;
    }

    public BigDecimal getTaxDiff() {
        return taxDiff;
    }

    public void setTaxDiff(BigDecimal taxDiff) {
        this.taxDiff = taxDiff;
    }

    public BigDecimal getFcnyDiff() {
        return fcnyDiff;
    }

    public void setFcnyDiff(BigDecimal fcnyDiff) {
        this.fcnyDiff = fcnyDiff;
    }

    public Integer getDiscountC() {
        return discountC;
    }

    public void setDiscountC(Integer discountC) {
        this.discountC = discountC;
    }

    public Integer getDiscountZ() {
        return discountZ;
    }

    public void setDiscountZ(Integer discountZ) {
        this.discountZ = discountZ;
    }

    public double getAgentCam() {
        return agentCam;
    }

    public void setAgentCam(double agentCam) {
        this.agentCam = agentCam;
    }

    public double getAgentZam() {
        return agentZam;
    }

    public void setAgentZam(double agentZam) {
        this.agentZam = agentZam;
    }

    public double getAgentCamDiff() {
        return agentCamDiff;
    }

    public void setAgentCamDiff(double agentCamDiff) {
        this.agentCamDiff = agentCamDiff;
    }

    public double getAgentZamDiff() {
        return agentZamDiff;
    }

    public void setAgentZamDiff(double agentZamDiff) {
        this.agentZamDiff = agentZamDiff;
    }

    public Integer getCurStatus() {
        return curStatus;
    }

    public void setCurStatus(Integer curStatus) {
        this.curStatus = curStatus;
    }

    public boolean getRefundedFlag() {
        return refundedFlag;
    }

    public void setRefundedFlag(boolean refundedFlag) {
        this.refundedFlag = refundedFlag;
    }

    public boolean getChangeUpdateFlag() {
        return changeUpdateFlag;
    }

    public void setChangeUpdateFlag(boolean changeUpdateFlag) {
        this.changeUpdateFlag = changeUpdateFlag;
    }

    public Integer getIssueTicketSt() {
        return issueTicketSt;
    }

    public void setIssueTicketSt(Integer issueTicketSt) {
        this.issueTicketSt = issueTicketSt;
    }

    public String getIssueTicketMessage() {
        return issueTicketMessage;
    }

    public void setIssueTicketMessage(String issueTicketMessage) {
        this.issueTicketMessage = issueTicketMessage;
    }

    public Integer getErrorRefundFlag() {
        return errorRefundFlag;
    }

    public void setErrorRefundFlag(Integer errorRefundFlag) {
        this.errorRefundFlag = errorRefundFlag;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public String getContactNm() {
        return contactNm;
    }

    public void setContactNm(String contactNm) {
        this.contactNm = contactNm;
    }

    public String getContactTel() {
        return contactTel;
    }

    public void setContactTel(String contactTel) {
        this.contactTel = contactTel;
    }

    public String getContactTelCountry() {
        return contactTelCountry;
    }

    public void setContactTelCountry(String contactTelCountry) {
        this.contactTelCountry = contactTelCountry;
    }

    public String getContactEmail() {
        return contactEmail;
    }

    public void setContactEmail(String contactEmail) {
        this.contactEmail = contactEmail;
    }

    public Set<PaxDO> getPaxs() {
        return paxs;
    }

    public void setPaxs(Set<PaxDO> paxs) {
        this.paxs = paxs;
    }

    public Set<TicketDO> getTickets() {
        return tickets;
    }

    public void setTaxFees(Set<TaxFeeDO> taxFees) {
        this.taxFees = taxFees;
    }

    public Set<TaxFeeDO> getTaxFees() {
        return taxFees;
    }

    public void setSegments(Set<SegmentDO> segments) {
        this.segments = segments;
    }

    public Set<SegmentDO> getSegments() {
        return segments;
    }

    public void setTickets(Set<TicketDO> tickets) {
        this.tickets = tickets;
    }


    public String getIssueType() {
        return issueType;
    }


	public String toStringByTxt() {
		return  flightOrderNo + "!@!" + productType + "!@!" + routeTp
				+ "!@!" + orderScope + "!@!" + issueType + "!@!" + orderSt + "!@!"
				+ orderTp + "!@!" + oldRecId + "!@!" + newRecId + "!@!" + sourceIp
				+ "!@!" + channel + "!@!" + site + "!@!" + ei + "!@!" + ecomment + "!@!" + fcNy
				+ "!@!" + scNy + "!@!" + taxAm + "!@!" + agentAm + "!@!" + payNo + "!@!"
				+ changeAm + "!@!" + scnyDiff + "!@!" + agentAmDiff + "!@!" + taxDiff
				+ "!@!" + fcnyDiff + "!@!" + discountC + "!@!" + discountZ + "!@!"
				+ agentCam + "!@!" + agentZam + "!@!" + agentCamDiff + "!@!"
				+ agentZamDiff + "!@!" + curStatus + "!@!" + refundedFlag + "!@!"
				+ changeUpdateFlag + "!@!" + issueTicketSt + "!@!" + issueTicketMessage
				+ "!@!" + errorRefundFlag + "!@!" + orderNo + "!@!" + contactNm
				+ "!@!" + contactTel + "!@!" + contactTelCountry + "!@!"
				+ contactEmail + "!@!" + currency + "!@!" + northAmerica + "!@!" + paxs
				+ "!@!" + tickets + "!@!" + taxFees + "!@!" + segments + "!@!"
				+ ticketCount + "!@!" + cardType + "!@!" + ffpNo + "!@!" + flightType
				+ "!@!" + promoCode + "!@!" + promoType + "!@!" + promoCurrency
				+ "!@!" + promoAmount + "!@!" + isImportantFlight + "!@!"
				+ upgradeCouponNo + "!@!" + pointAmount + "!@!" + pointTp + "!@!" + promoTp;
	}

	public void setIssueType(String issueType) {
        this.issueType = issueType;
    }

    public String getCurrency() {
        return currency;
    }

    public void setCurrency(String currency) {
        this.currency = currency;
    }

    public String getNorthAmerica() {
        return northAmerica;
    }

    public void setNorthAmerica(String northAmerica) {
        this.northAmerica = northAmerica;
    }
    /**
     * 积分总额 *
     */
    private BigDecimal pointAmount;

    public BigDecimal getPointAmount() {
        return pointAmount;
    }

    public void setPointAmount(BigDecimal pointAmount) {
        this.pointAmount = pointAmount;
    }
    /**
     * 积分种类*
     */
    private String pointTp;

    public String getPointTp() {
        return pointTp;
    }

    public void setPointTp(String pointTp) {
        this.pointTp = pointTp;
    }

    public Integer getTicketCount() {
        return ticketCount;
    }

    public void setTicketCount(Integer ticketCount) {
        this.ticketCount = ticketCount;
    }

    public String getCardType() {
        return cardType;
    }

    public void setCardType(String cardType) {
        this.cardType = cardType;
    }

    public String getFfpNo() {
        return ffpNo;
    }

    public void setFfpNo(String ffpNo) {
        this.ffpNo = ffpNo;
    }

    public String getFlightType() {
        return flightType;
    }

    public void setFlightType(String flightType) {
        this.flightType = flightType;
    }

    public String getPromoCode() {
        return promoCode;
    }

    public String getPromoType() {
        return promoType;
    }

    public String getPromoCurrency() {
        return promoCurrency;
    }

    public BigDecimal getPromoAmount() {
        return promoAmount;
    }

    /**
     * @param promoCode the promoCode to set
     */
    public void setPromoCode(String promoCode) {
        this.promoCode = promoCode;
    }

    /**
     * @param promoType the promoType to set
     */
    public void setPromoType(String promoType) {
        this.promoType = promoType;
    }

    /**
     * @param promoCurrency the promoCurrency to set
     */
    public void setPromoCurrency(String promoCurrency) {
        this.promoCurrency = promoCurrency;
    }

    /**
     * @param promoAmount the promoAmount to set
     */
    public void setPromoAmount(BigDecimal promoAmount) {
        this.promoAmount = promoAmount;
    }
	public String getIsImportantFlight() {
		return isImportantFlight;
	}

	public void setIsImportantFlight(String isImportantFlight) {
		this.isImportantFlight = isImportantFlight;
	}

	public String getUpgradeCouponNo() {
		return upgradeCouponNo;
	}

	public void setUpgradeCouponNo(String upgradeCouponNo) {
		this.upgradeCouponNo = upgradeCouponNo;
	}

	public BigDecimal getPointFcnyDiff() {
		return pointFcnyDiff;
	}

	public void setPointFcnyDiff(BigDecimal pointFcnyDiff) {
		this.pointFcnyDiff = pointFcnyDiff;
	}

	public BigDecimal getPointScnyDiff() {
		return pointScnyDiff;
	}

	public void setPointScnyDiff(BigDecimal pointScnyDiff) {
		this.pointScnyDiff = pointScnyDiff;
	}

	public BigDecimal getPointChangeAm() {
		return pointChangeAm;
	}

	public void setPointChangeAm(BigDecimal pointChangeAm) {
		this.pointChangeAm = pointChangeAm;
	}

    public String getKamNo() {
        return kamNo;
    }

    public void setKamNo(String kamNo) {
        this.kamNo = kamNo;
    }
    

    
	public String getPromoTp() {
		return promoTp;
	}

	public void setPromoTp(String promoTp) {
		this.promoTp = promoTp;
	}
    
	@Override
	public String toString() {
		return  flightOrderNo + StringUtil.SEPARATOR + productType + StringUtil.SEPARATOR + routeTp
				+ StringUtil.SEPARATOR + orderScope  + StringUtil.SEPARATOR + orderSt + StringUtil.SEPARATOR
				+ orderTp + StringUtil.SEPARATOR + orderNo+ StringUtil.SEPARATOR + oldRecId + StringUtil.SEPARATOR + newRecId + StringUtil.SEPARATOR + sourceIp
				+ StringUtil.SEPARATOR + channel + StringUtil.SEPARATOR + site + StringUtil.SEPARATOR + StringUtil.replaceBlank(ei) + StringUtil.SEPARATOR + StringUtil.replaceBlank(ecomment) + StringUtil.SEPARATOR + fcNy
				+ StringUtil.SEPARATOR + scNy + StringUtil.SEPARATOR + taxAm + StringUtil.SEPARATOR + agentAm + StringUtil.SEPARATOR + payNo + StringUtil.SEPARATOR
				+ changeAm + StringUtil.SEPARATOR + scnyDiff + StringUtil.SEPARATOR + agentAmDiff + StringUtil.SEPARATOR + taxDiff
				+ StringUtil.SEPARATOR + fcnyDiff + StringUtil.SEPARATOR + discountC + StringUtil.SEPARATOR + discountZ + StringUtil.SEPARATOR
				+ agentCam + StringUtil.SEPARATOR + agentZam + StringUtil.SEPARATOR + agentCamDiff + StringUtil.SEPARATOR
				+ agentZamDiff + StringUtil.SEPARATOR + curStatus + StringUtil.SEPARATOR + refundedFlag + StringUtil.SEPARATOR
				+ changeUpdateFlag + StringUtil.SEPARATOR + issueTicketSt + StringUtil.SEPARATOR + StringUtil.replaceBlank(issueTicketMessage)
				+ StringUtil.SEPARATOR + errorRefundFlag + StringUtil.SEPARATOR+createId+ StringUtil.SEPARATOR + DateUtil.toString(createDtm, StringUtil.DATEFORMATE)
				+ StringUtil.SEPARATOR+updateId+ StringUtil.SEPARATOR + DateUtil.toString(updateDtm, StringUtil.DATEFORMATE)+ StringUtil.SEPARATOR+version+ StringUtil.SEPARATOR+deleted
				+ StringUtil.SEPARATOR + contactNm+ StringUtil.SEPARATOR + contactTel+ StringUtil.SEPARATOR
				+ contactEmail+ StringUtil.SEPARATOR + issueType + StringUtil.SEPARATOR + currency + StringUtil.SEPARATOR + northAmerica
				+ StringUtil.SEPARATOR + pointAmount + StringUtil.SEPARATOR + pointTp+ StringUtil.SEPARATOR + contactTelCountry
				+ StringUtil.SEPARATOR + tickets + StringUtil.SEPARATOR+ ffpNo+ StringUtil.SEPARATOR + cardType  + StringUtil.SEPARATOR + flightType
				+ StringUtil.SEPARATOR + promoCode + StringUtil.SEPARATOR + promoType+ StringUtil.SEPARATOR + promoAmount
				+ StringUtil.SEPARATOR + promoCurrency + StringUtil.SEPARATOR + isImportantFlight + StringUtil.SEPARATOR
				+ upgradeCouponNo + StringUtil.SEPARATOR + promoTp;
	}
	
}
